package com.quan.eureka.server;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;

@EnableEurekaServer
@SpringBootApplication
public class ApplicationEurekaServer implements CommandLineRunner, DisposableBean {
	
	private static final Logger logger = LoggerFactory.getLogger(ApplicationEurekaServer.class);
	
	public static void main(String[] args) {
		SpringApplication.run(ApplicationEurekaServer.class, args) ;
	}
	
	@Override
	public void run(String... args) throws Exception {
		logger.info("**********************************************");
		logger.info("Eureka注册中心 启动.....");
		logger.info("**********************************************");
	}
	
	@Override
	public void destroy() throws Exception {
		logger.info("**********************************************");
		logger.info("Eureka注册中心  关闭.....");
		logger.info("**********************************************");
	}

}
